package com.threeti.jiayusms.domain.service.legacy;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.threeti.jiayusms.domain.model.legacy.Order;
import com.threeti.jiayusms.framework.util.DynaSearchCriteria;
import com.threeti.jiayusms.framework.util.PagedListHandler;
import com.threeti.jiayusms.infrastructure.legacy.OrderDao;

@Service
@Transactional(readOnly=true)
public class OrderQueryServiceImpl implements OrderQueryService {

	@Autowired
	private OrderDao dao;
	
	@Override
	public PagedListHandler<Order> findAllOrdersByPage(
			int currentPageIndex, int startingIndex) {
		// TODO Auto-generated method stub
		return dao.findAllOrdersByPage(currentPageIndex, startingIndex);
	}

	@Override
	public List<Order> findOrderTemplatesByList(
			DynaSearchCriteria dynaSearchCriteria) {
		// TODO Auto-generated method stub
		return dao.findOrderTemplatesByList(dynaSearchCriteria);
	}

	@Override
	public List<Order> findAllOrder() {
		
		return dao.findAll();
	}

}
